package com.example.demo.service;

import com.example.demo.entity.CommentEntity;
import com.example.demo.vo.CommentVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CommentService {
    List<CommentEntity> getCommentsByProductId(int products_id);
    List<CommentEntity> getCommentsByUserId(int user_id);
    int addComment(CommentVo commentVo);
    int updateComment(CommentVo commentVo);
    int deleteComment(int id);
    CommentEntity getCommentById(int id);
    double getAverageRatingByProductId(int products_id);
    int delCommentUserId(int user_id);
}